import math
def catalan(n: int) -> int:
    return math.comb(2*n, n) / (n+1)


assert catalan(0) == 1
assert catalan(1) == 1
assert catalan(5) == 42
assert catalan(10) == 16796